ABC122 B - ATCoder
Submission #13428333 - AtCoder Beginner Contest 122
全探索